package cc.uncarbon.module.custom.model.request;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import lombok.experimental.SuperBuilder;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.math.BigDecimal;
import cc.uncarbon.framework.core.enums.YesOrNoEnum;
import cc.uncarbon.framework.core.enums.EnabledStatusEnum;


/**
 * 后台管理-新增/编辑用户信息 DTO
 */
@Accessors(chain = true)
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
@Data
public class AdminUserInsertOrUpdateDTO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;


    @Schema(description = "主键ID", hidden = true, title = "仅更新时使用")
    private Long id;

    @Schema(description = "姓名", requiredMode = Schema.RequiredMode.REQUIRED)
    @Size(max = 50, message = "【姓名】最长50位")
    @NotBlank(message = "姓名不能为空")
    private String name;

    @Schema(description = "昵称")
    @Size(max = 50, message = "【昵称】最长50位")
    private String nickname;

    @Schema(description = "密码，建议加密存储", requiredMode = Schema.RequiredMode.REQUIRED)
    @Size(max = 100, message = "【密码，建议加密存储】最长100位")
    @NotBlank(message = "密码，建议加密存储不能为空")
    private String password;

    @Schema(description = "头像URL")
    @Size(max = 255, message = "【头像URL】最长255位")
    private String avatar;

    @Schema(description = "性别,1，男，2，女", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "性别,1，男，2，女不能为空")
    private Integer sex;

    @Schema(description = "微信唯一标识")
    @Size(max = 100, message = "【微信唯一标识】最长100位")
    private String wxUnionid;

    @Schema(description = "微信昵称")
    @Size(max = 1000, message = "【微信昵称】最长1000位")
    private String wxName;

    @Schema(description = "手机号")
    @Size(max = 15, message = "【手机号】最长15位")
    private String phone;

    @Schema(description = "生日")
    private LocalDate birthday;

    @Schema(description = "消费金额")
    private BigDecimal consumptionAmount;

    @Schema(description = "进店次数", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "进店次数不能为空")
    private Integer serviceCount;

    @Schema(description = "访问次数", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "访问次数不能为空")
    private Integer visitCount;

}
